﻿using RPAVIEW.util;
using RPAVIEW.views.controlLibrary;
using System.Windows.Controls;
namespace RPAVIEW.views.EditPage.flows.OpenWebPageN {
    /// <summary>
    /// Input.xaml 的交互逻辑
    /// </summary>
    public partial class Input:BaseParamViewAction{
        public Input() {
            InitializeComponent();
        }

        public override void UpdateSource() {
            this.url.GetBindingExpression(SelVarTextBox.text).UpdateSource();
            this.browserType.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
        }
        private void ChangeAdvanceLabel(object sender, SelectionChangedEventArgs e) {
            int selectIndex = this.browserType.SelectedIndex;
            FlowEditWindow window = WindowUtil.GetWindow<FlowEditWindow>();
            Advance advacePage = window.Advance.advanceContent.Children[0] as Advance;
            if(selectIndex == 0) {
                advacePage.borwserPathLabel.Content = "GOOGLE执行文件路径";
            }else if(selectIndex == 1) {
                advacePage.borwserPathLabel.Content = "IE执行文件路径";
            } else { 
                advacePage.borwserPathLabel.Content = "Edge执行文件路径";
            }
        }
    }
}
